//package cn.lxiaol.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
//import org.springframework.security.core.userdetails.UserDetailsService;
//import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
//import org.springframework.security.crypto.password.PasswordEncoder;
//import org.springframework.security.web.authentication.rememberme.JdbcTokenRepositoryImpl;
//import org.springframework.security.web.authentication.rememberme.PersistentTokenRepository;
//
//import javax.annotation.Resource;
//import javax.sql.DataSource;
//
///**
// * @author lixiaolong
// */
//@Configuration
//public class SecurityTestConfig extends WebSecurityConfigurerAdapter {
//    @Resource
//    private UserDetailsService userDetailsService;
//    @Resource
//    private PasswordEncoder passwordEncoder;
//
//
//    @Bean
//    PasswordEncoder passwordEncoder() {
//        // 密码加密
//        return new BCryptPasswordEncoder();
//    }
//
//    /**
//     * 验证账号密码
//     *
//     * @param auth
//     * @throws Exception
//     */
//    @Override
//    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
//        //指定service
//        auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder);
//    }
//
//
//
//
//}
